/**
 * 2009-9-13 下午10:34:50 
 * esignature 
 * com.smc.domain.model
 * Authentication
 */
package com.smc.domain.model;

import java.io.Serializable;

/**
 * @author chenheng
 * @version 0.0.1
 */

/**
 * @hibernate.mapping
 * schema="esignature"
 * @hibernate.class
 * table="t_authentication"
 * dynamic-update="true"
 * dynamic-insert="true"
 * select-before-update="true"
 * 权限认证数据模型，由角色值，资源值，操作值构成
 */
public class Authentication implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -975492245262523396L;
	/** 
	 * @hibernate.id 
	 * generator-class = "uuid"
	 * 主键
	 */
	private String uuid;
	/**
	 * @hibernate.property
	 * 角色值
	 */
	private int role;
	/**
	 * @hibernate.property
	 * 权限操作值
	 */
	private int authority;
	/**
	 * @hibernate.property
	 * 资源值
	 */
	private int resource;
	/**
	 * @hibernate.many-to-one
	 * column="user_uuid"
	 * 权限对应的用户，多对一的关系。一个用户同时可能具有多个权限。
	 */
	private User user;
	
	public int getAuthority() {
		return authority;
	}
	public void setAuthority(int authority) {
		this.authority = authority;
	}
	public int getResource() {
		return resource;
	}
	public void setResource(int resource) {
		this.resource = resource;
	}
	public int getRole() {
		return role;
	}
	public void setRole(int role) {
		this.role = role;
	}
	public String getUuid() {
		return uuid;
	}
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
}
